<template>
	<div>
		<div class="graybg"></div>
		<!--头部-->
		<header id="header">
			<div class="header header_bg clearfix">
				<div class="header_left pull-left">
					<i class="iconfont baiColor" onclick="javascript:history.back(-1)">&#xe612;</i>
				</div>
				<div class="header_center baiColor">二维码名片</div>
			</div>
		</header>
		<div class="main _width">
			<div class="main-main marginAuto">
				<div class="main-main-text marginAuto">
					<div class="portrait _width clearfix">
						<div class="portrait-img pull-left">
							<img :src="img" alt="头像"/>
						</div>
						<div class="portrait-text pull-left">
							<p class="ellipsis01" v-text="name"></p>
							<p class="ellipsis01">ID：{{id}}</p>
						</div>
					</div>
					<div class="code">
						<img :src="imgURL+'/One/Social/qecodeCard/token/'+info" alt="二维码"/>
					</div>
					<div class="code-text">
						<p>扫一扫上面的二维码图片，加我为好友</p>
					</div>
				</div>
			</div>
		</div>
	</div>
</template>

<script>
	export default{
		data(){
			return{
				imgURL:this.imgURL,
				img:"",
				name:"",
				id:"",
				info:'',
			}
		},
		mounted(){
			let _this = this;
			var arr = ['u_img','u_invite','u_name'];
			_this.info = window.localStorage.data;
			var info = window.localStorage.data;
			var params = new URLSearchParams();
			params.append('token', info);	//客户秘钥（信息）
			params.append('arr',arr);
			this.$axios({
			    url:"Home/Config/getUserField",
				method:"post",
				data:params
			 }).then((res) =>{
					  if(res.data.code == 1){
						  let datas = res.data.data;
						  this.img = datas.u_img;
						  this.name = datas.u_name;
						  this.id = datas.u_invite;
					  }
			}).catch(function(err){
				console.log(err)		
			})
		},
	}
</script>

<style scoped>
	@import "../css/public.css";
	.header .header_left i{
		font-size: 20px;
	}
	/*=内容部分=*/
	.main{
		padding-top: 50px;
	}
 	.main-main{
 		width: 90%;
 		background: #fff;
 	}
 	.main-main-text{
 		width: 90%;
 		padding: 10px 0;
 	}
 	.portrait{
 		height:70px;
 	}
 	.portrait-img{
 		width: 70px;
 		height: 70px;
 		margin-right: 10px;
 	}
 	.portrait-img img{
 		width: 100%;
 		height: 100%;
 		border-radius: 10px;
 	}
 	.portrait-text{
 		width: 65%;
 		height: 70px;
 	}
 	.portrait-text p{
 		line-height: 35px;
 	}
 	/*==*/
 	.code{
 		width:160px;
 		height: 160px;
 		margin: 30px auto;
 		background:#F3961F;
 	}
 	.code img{
 		width: 100%;
 		height: 100%;
 	}
 	/*==*/
 	.code-text{
 		line-height: 30px;
 		color:#666666;
 		font-size: 14px;
 		text-align: center;
 	}
 	
 	
 	
 	
	
	
	
</style>